<template>
  <div class="app-container">
    <!-- 搜索 -->
    <el-card class="search-card">
      <el-form
        :model="queryParams"
        ref="queryForm"
        size="small"
        :inline="true"
        v-show="showSearch"
        label-width="68px"
      >
        <el-row>
          <el-form-item label="姓名" prop="name">
            <el-input
              v-model="queryParams.name"
              placeholder="请输入姓名"
              clearable
              maxlength="50"
              show-word-limit
              style="width: 100%"
            />
          </el-form-item>
          <el-form-item label="身份证号" prop="idCardNumber">
            <el-input
              v-model="queryParams.idCardNumber"
              placeholder="请输入身份证号"
              clearable maxlength="18"
              show-word-limit
              style="width: 100%"
            />
          </el-form-item>
          <el-form-item label="校区" prop="classId">
            <el-select
              v-model="queryParams.classId"
              placeholder="请选择校区"
              style="width: 100%"
            >
              <el-option
                v-for="(item, index) in classList_1"
                :key="index"
                :value="item.id"
                :label="item.className"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="年级" prop="gradeId">
            <el-select
              v-model="queryParams.gradeId"
              placeholder="请选择年级名称"
              style="width: 100%"
              @change="gradeFun_1"
            >
              <el-option
                v-for="(item, index) in gradeList"
                :key="index"
                :value="item.id"
                :label="item.gradeName"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="班级" prop="classId">
            <el-select
              v-model="queryParams.classId"
              placeholder="请选择班级"
              style="width: 100%"
            >
              <el-option
                v-for="(item, index) in classList_1"
                :key="index"
                :value="item.id"
                :label="item.className"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="mini"
              @click="handleQuery"
            >
              搜索
            </el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
              重置
            </el-button>
          </el-form-item>
        </el-row>
      </el-form>
    </el-card>
    <!-- 按钮 -->
    <el-card class="search-card">
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            v-hasPermi="['campus:person:export']"
          >
            导出
          </el-button>
        </el-col>

        <right-toolbar
          :showSearch.sync="showSearch"
          @queryTable="getList"
        ></right-toolbar>
      </el-row>
    </el-card>
    <!-- 列表 -->
    <el-card class="table-card">
      <el-table :data="dataList">
        <el-table-column label="学生姓名" align="center" prop="idCardNumber" />
        <el-table-column label="性别" align="center" prop="name" />
        <el-table-column label="身份证号" align="center" prop="name" />
        <el-table-column label="联系电话" align="center" prop="name" />
        <el-table-column label="校区" align="center" prop="name" />
        <el-table-column label="年级" align="center" prop="schoolName" />
        <el-table-column label="班级" align="center" prop="gradeName" />
        <el-table-column label="账单金额" align="center" prop="phoneNumber" />
        <el-table-column label="团餐计划" align="center" prop="phoneNumber" />
        <el-table-column label="缴费状态" align="center" prop="phoneNumber" />
      </el-table>
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-card>
  </div>
</template>
<script>
import {} from "@/api/campus/person";
import {} from "@/api/campus/grade";
import {} from "@/api/campus/classManage";

export default {
  name: "orderTeamMeal",
  dicts: ["facial_state", "sys_open_status", "personnel_identity"],
  data() {
    return {
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      dataList: [],
      classList_1: [],
    };
  },
  created() {},
  
  activated() {
    this.$forceUpdate();
  },
  methods: {
    getList() {},
    gradeFun_1() {},
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
  },
};
</script>
<style>
.padding_4_10 {
  padding: 4px 10px !important;
}
</style>
